#define _CRT_SECURE_NO_WARNINGS 1

#include"SList.h"

void TestSList()
{
	STLNode* plist = NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPushBack(&plist, 4);
	SListPrint(plist);
	SListPushFront(&plist, 0);
	SListPrint(plist);
	SListPopFront(&plist);
	SListPrint(plist);
	SListPopBack(&plist);
	SListPrint(plist);
	STLNode* pos = SListFind(&plist,1);
	if (pos != NULL)
	{
		SListInsert(&plist, pos, 20);
	}
	SListPrint(plist);
	pos = SListFind(&plist, 20);
	if (pos != NULL)
	{
		SListErase(&plist, pos);
	}
	SListPrint(plist);

}
int main()
{
	TestSList();
	return 0;
}